package com.example.bicycle.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.bicycle.domain.dto.UserLocationDto;
import com.example.bicycle.domain.entity.ElectricBike;
import com.example.bicycle.domain.mqtt.PublishSettingMessageVo;
import com.example.bicycle.domain.vo.PageVo;


/**
 * (ElectricBike)表服务接口
 *
 * @author makejava
 * @since 2023-08-02 21:29:20
 */
public interface ElectricBikeService extends IService<ElectricBike> {

    PageVo listByUserLocation(int pageNum, int pageSize, UserLocationDto userLocationDto);
    PageVo availableBikeByUserLocation(int pageNum, int pageSize, UserLocationDto userLocationDto);

    boolean rent(int bikeId, UserLocationDto userLocationDto);

    boolean returnBike(int bikeId, UserLocationDto userLocationDto);

    boolean lock(int bikeId, UserLocationDto userLocationDto);

    boolean unlock(int bikeId, UserLocationDto userLocationDto);

    PublishSettingMessageVo setting(Integer bikeId, Float lightThreshold, Boolean isSyncTime);
}

